<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="Content-Language" content="zh-cn">
    <link rel="shortcut icon" href="favicon.ico" />
    <title>练习收藏夹 - 背响！政治学考</title>
    <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.css"
        integrity="sha256-UXesixbeLkB/UYxVTzuj/gg3+LMzgwAmg3zD+C4ZASQ=" crossorigin="anonymous" >
    <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.min.js"
        integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/npm/semantic-ui@2.4.2/dist/semantic.min.js"
        integrity="sha256-CgSoWC9w5wNmI1aN8dIMK+6DPelUEtvDr+Bc2m/0Nx8=" crossorigin="anonymous"></script>
    -->
    <link rel="stylesheet" href="semantic.min.css">
    <script src="jquery.min.js"></script>
    <script src="semantic.min.js"></script>
    <script>
        $(document)
            .ready(function() {

            // fix main menu to page on passing
            $('.main.menu').visibility({
                type: 'fixed',
            });

            // show dropdown on hover
            $('.main.menu').dropdown({
                on: 'hover'
            });
            })
        ;
    </script>
    <!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.css" 
        integrity="sha384-zB1R0rpPzHqg7Kpt0Aljp8JPLqbXI3bhnPWROx27a9N0Ll6ZP/+DiW/UqRcLbRjq" crossorigin="anonymous">-->

    <!-- The loading of KaTeX is deferblue to speed up page rendering -->
    <!--<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/katex.min.js"
        integrity="sha384-y23I5Q6l+B6vatafAwxRu/0oK/79VlbSz7Q9aiSZUvyWYIYsd+qj+o24G5ZU2zJz" crossorigin="anonymous"></script>-->
        
    <link rel="stylesheet" href="katex.min.css">
    <script defer src="katex.min.js"></script>

    <!-- To automatically render math in text elements, include the auto-render extension: -->
    <!--<script defer src="https://cdn.jsdelivr.net/npm/katex@0.11.1/dist/contrib/auto-render.min.js"
        integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"></script>-->
    <script defer src="auto-render.min.js"></script>
    <script>
        document.addEventListener("DOMContentLoaded", function() {
            renderMathInElement(document.body,{
            delimiters:[
                {left: '$', right: '$', display: false},
                {left: '$$', right: '$$', display: true},
                {left: '\\(', right: '\\)', display: false},
                {left: '\\[', right: '\\]', display: true}
            ]});
        });
    </script>
    <script>
        function GetQueryString(name){
            var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r!=null)
                return r[2];
            return null;
        }
        function shuffle(arr){
            /*From countercurrent-time*/
            var renn = arr.length;
            while (renn--) {
                var index = Math.floor(Math.random() * renn);
                var temp = arr[index];
                arr[index] = arr[renn];
                arr[renn] = temp;
            }
        }
        var ranges=JSON.parse(atob(GetQueryString("fav")));
        if (GetQueryString("rand")=="1")
            shuffle(ranges);
        //0~13, 14~28, 29~37, 38~49
        var favs=new Set();
        var now_position=0;
        var random_choose_res=0;
        function do_after_killed(){
            if (GetQueryString("rand")=="1")
                shuffle(ranges);
        }
    </script>
    <script src="main.js"></script>
</head>

<body>
    <div class="ui main container">
        <center><h1>背响！政治学考</h1></center>
        <center><h2>练习收藏夹</h2></center>
    </div>
    <div class="ui five item inverted blue main menu" style="">
        <div class="ui text container">
            <a class="item" href="index.html">顺序背</a>
            <a class="item" href="random.html">打乱背</a>
            <a class="item" href="part1.html">必修一</a>
            <a class="item" href="part2.html">必修二</a>
            <a class="item" href="part3.html">必修三</a>
            <a class="item" href="part4.html">必修四</a>
        </div>
    </div>
    <div class="ui text container" id="main_text">
        <div class="ui progress blue" data-value="0" data-total="50"
             id="main_progress">
            <div class="bar">
                <div class="progress"></div>
            </div>
            <div class="label">加油吧！</div>
        </div>
        <div id="statement_box">
            <p id="problem_source">
            题目编号：<span id="problem_no"></span><br />
            <span id="source_book"></span>
            </p>
            <p id="problem"></p>
            <button class="ui button blue" id="display_sol">显示答案</button>
            <button class="ui button blue" id="next_prob">下一题</button>
            <button class="ui button blue" id="add_to_list">加入收藏</button>
            <p> </p>
            <div id="solution"></div>
            <p> </p>
            <div class="ui form">
                <div class="field">
                    <label>收藏夹</label>
                    <textarea id="fav_textarea"></textarea>
                </div>
                <button class="ui button blue" id="import_fav">导入收藏</button>
                <button class="ui button blue" id="clear_fav">清空收藏</button>
                <button class="ui button blue" id="copy_fav">复制到剪贴板</button>
                <button class="ui button blue" id="prac_fav">练习收藏夹内容</button>
            </div>
        </div>
    </div>
    <div class="ui modal" id="all_killed_modal">
        <div class="header">
            背诵完成！
        </div>
        <div class="content">
            <p>恭喜你顺利背诵完成！祝学考顺利！</p>
            <p>从头开始继续复习吧！将继续练习原收藏夹内容。</p>
        </div>
        <div class="actions">
            <div class="ui positive right button">
                继续加油！
            </div>
        </div>
    </div>
    <div class="ui modal" id="ran_modal">
        <div class="header">
            请选择是否打乱收藏夹
        </div>
        <div class="content">
            <p>是否要打乱收藏夹内容的顺序？</p>
        </div>
        <div class="actions">
            <div class="ui green positive right button">
                是
            </div>
            <div class="ui red negative right button">
                否
            </div>
        </div>
    </div>
    <div class="ui modal" id="empty_fav_warn_modal">
        <div class="header">
            收藏夹为空
        </div>
        <div class="content">
            <p>收藏夹为空，无法练习收藏夹。</p>
        </div>
        <div class="actions">
            <div class="ui ok gray right button">
                确定
            </div>
        </div>
    </div>
    <div class="ui inverted blue footer segment">
        <div class="ui center aligned container">
            <div class="ui inverted list">
                <p class="item">由 Sweetlemon 设计</p>
                <p class="item">使用了高中思想政治课本资料</p>
                <p class="item">建议使用 Firefox, Chrome 等现代浏览器浏览</p>
            </div>
        </div>
    </div>
</body>
</html>
